<!--
  User: Kuttubek Aidaraliev
  Date: 06.05.2010
  Time: 10:50:27
-->
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:rich="http://richfaces.org/rich"
    xmlns:a4j="http://richfaces.org/a4j"
    template="../../WEB-INF/jspx/common/template.xhtml">

    <ui:define name="head">
        <title>
            <h:outputText value="#{messages.contactPersonList}" />
        </title>
    </ui:define>
  <ui:define name="body">
     <h3 align="center"><h:outputText value="#{messages.contactPersonList}" /></h3>
         <h:form>
            <h:commandButton value="#{messages.create}" action="#{contactPersonBeanController.preInsert}"/>
         </h:form>
         <rich:spacer height="10" width="100%" />
         <f:subview id="table">
              <ui:decorate template="../../WEB-INF/jspx/contactPerson/contactPersonTable.xhtml">
             <h:form>
                   <h:commandLink action="#{contactPersonBeanController.preUpdate}">
                        <h:outputText value="#{messages.edit}" />
                        <f:setPropertyActionListener value="#{contactPerson}" target="#{contactPersonBeanController.entity}"/>
                    </h:commandLink>
                </h:form>
                <rich:spacer height="10" width="20"/>
                <a4j:region>
                    <a4j:form>
                        <a4j:htmlCommandLink id="delete" action="#{contactPersonBeanController.deleted}">
                           <h:outputText value="#{messages.delete}"/>
                           <f:setPropertyActionListener value="#{contactPerson}"
                                                target="#{contactPersonBeanController.entity}" />
                        </a4j:htmlCommandLink>
                   </a4j:form>
                </a4j:region>
             <ui:param name="contactPersons" value="#{contactPersonBeanController.realList}"/>
             <ui:param name="id" value="contactPersonTable"/>
         </ui:decorate>
         </f:subview>
  </ui:define>
</ui:composition>